struct User {
	age int
}

fn (u User) can_register() bool {
	return u.age > 16
}

// V doesn't have classes, but you can define methods on types
// a method is a function with a special receiver argument
// the receiver appears in its own argument list between fn and method name
// methods must be in the same module as the receiver type
fn main() {
	user := User{
		age: 10
	}
	println(user.can_register()) // "false"
	
	user2 := User{
		age: 20
	}
	println(user2.can_register()) // "true"
}
